import http from '../index'

const api = '/store/voucher'

export function get(params) {
  return http.get(api, {
    params
  })
}

export function create(data) {
  return http.post(api, data)
}

export function del(id) {
  return http.delete(api + '/' + id)
}

export function status(data) {
  return http.post(api + '/status/' + data.id, data)
}

export function code(code) {
  return http.post(api + '/code', { code })
}